/*
 * User: Sebastian Schuth <sebastian.schuth@agimatec.de>
 * Date: 30.10.2008
 * Time: 07:39:18
 * Copyright (c) 2008 agimatec GmbH
 */
package com.agimatec.locators.predicate;

/**
 * LocatorPart matching node by its "type" attribute value.
 */
public class Type extends Predicate {
    private String type;

    /**
     * Constructor.
     *
     * @param type Value the "type" Attribute must have to match.
     */
    public Type(String type) {
        this.type = type;
    }

    public String locatorPartString(LocatorStringFactory factory) {
        return factory.getTypePredicate(type).locatorString();
    }
}
